Skip to content

feat(content-engine): align with @contentrain/mcp 1.5.0 / query 6 / types 0.5.1#55

Merged
ABB65 merged 3 commits into
mainfrom
chore/contentrain-pkg-1.5-alignment
Jun 8, 2026
Merged

feat(content-engine): align with @contentrain/mcp 1.5.0 / query 6 / types 0.5.1#55
ABB65 merged 3 commits into
mainfrom
chore/contentrain-pkg-1.5-alignment

Conversation

@ABB65

@ABB65 ABB65 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Özet

Contentrain/ai releaselerindeki yeni sürümlere (mcp@1.5.0, query@6.0.0, types@0.5.1) Studio'yu hizalar. Analiz sonucu 4 fazda uygulandı.

Değişiklikler

1. Sürüm bump'ları

  • @contentrain/types 0.5.0 → 0.5.1
  • @contentrain/mcp 1.4.0 → 1.5.0
  • @contentrain/query ^5.1.2 → ^6.0.0

query@6.0.0'ın breaking contentbody rename'i Studio için no-op: dokümanlar brain-cache'ten zaten .body ile okunuyor, t() interpolasyonunu kendi yapıyor. Client yeniden generate edildi, typecheck temiz.

2. Cloud MCP proxy — doğrulanmış no-op

Yeni branch_list/branch_delete/merge araçlarının üçü de localWorktree capability istiyor; Studio'nun GitHubProvider'ında bu false. Cloud üzerinden capability error dönüyorlar (tasarımca inert) → WRITE_TOOL_NAMES doğru şekilde değişmedi.

3. Branch-health config-driven

branchWarnLimit/branchBlockLimit (default 50/80) artık config.json'dan okunuyor (MCP 1.5.0). contentRoot engine + health/cleanup endpoint'leri + periyodik plugin'e geçirildi.

4. context.json post-merge regeneration (asıl mimari hizalama)

  • 6 yazma yolundan feature-branch context.json commit'i kaldırıldı → paralel save merge çakışması kapatıldı.
  • branch-ops.ts:mergeBranch artık merge sonrası contentrain üzerinde context.json'ı deterministik yeniden üretiyor (best-effort, self-heal).
  • initProject seed'i korundu; path birebir aynı (CONTEXT_PATH). Brain-cache zaten yalnız contentrain'den okuduğu için tüketici regresyonu yok.

Ek

  • .mcp.json: dev-time contentrain MCP server @contentrain/mcp@1.5.0'a pinlendi (pin'siz npx, latest'e kayıyordu).
  • CLAUDE.md: content-engine invariant + branch-health TODO güncellendi.

Doğrulama

  • pnpm typecheck
  • pnpm lint
  • pnpm test619 passed / 86 files ✅ (unit + integration + nuxt)

Contentrain added 3 commits June 4, 2026 22:26
…ypes 0.5.1

Bump Contentrain packages and align Studio with the new behaviour:

- deps: @contentrain/types 0.5.0→0.5.1, @contentrain/mcp 1.4.0→1.5.0,
  @contentrain/query ^5.1.2→^6.0.0. query v6's content→body rename is a
  no-op for Studio (documents are read from brain-cache as .body; t()
  interpolates manually), client regenerated, typecheck clean.

- context.json post-merge model (MCP 1.5.0): feature branches no longer
  carry context.json — removing the parallel-save merge-conflict surface.
  It is now regenerated deterministically on `contentrain` after a merge
  (branch-ops.ts:regenerateContextOnContentrain), best-effort with
  self-heal on the next merge. initProject still writes the seed. Path
  and consumer behaviour preserved (brain-cache only reads from contentrain).

- branch-health: warn/block thresholds are now config-driven via
  `branchWarnLimit`/`branchBlockLimit` (default 50/80); contentRoot threaded
  through engine, health/cleanup endpoints, and the periodic cleanup plugin.

- .mcp.json: pin the dev-time contentrain MCP server to @contentrain/mcp@1.5.0
  (was unpinned `npx @contentrain/mcp`, floating to latest).

- docs: update CLAUDE.md content-engine invariant + branch-health TODO.

Verified: pnpm typecheck, pnpm lint, pnpm test (619 passed / 86 files).
…ocument server layer

MCP's remote write path always reports `pending-review` and delegates the
merge to Studio, so MCP Cloud writes landed as `cr/*` branches even on
auto-merge projects — inconsistent with the native write paths.

- reconcile: new `reconcileMcpCloudAutoMerge` (server/utils/mcp-cloud-automerge.ts)
  lands pending branches only when the project's effective workflow is
  auto-merge, resolved with the same rule as the native paths: review
  requires both the `workflow.review` plan feature AND `config.workflow`
  opt-in; otherwise auto-merge. Wired into the /api/mcp/v1 proxy
  fire-and-forget after a successful write tool call — can never affect
  the external caller's response; no-op on review-gated projects.

- docs: add an MCP Cloud architecture section to CLAUDE.md (reduced tool
  surface via GitHubProvider localWorktree=false; pending-review contract +
  workflow-aware reconcile) and remove the stale "route implementation
  pending" TODO (the route is fully implemented).

- tests: unit coverage for the reconcile decision matrix (auto-merge,
  review-gated no-op, plan-forced auto-merge, already-merged skip,
  unreadable-config default, invalid repo, best-effort merge failure) and
  for mcp-cloud-keys generation/hashing.

Merged latest main (PR #54 chat tool trace persistence). Verified: typecheck,
lint, pnpm test (633 passed / 88 files).
@ABB65 ABB65 merged commit 3f4baf5 into main Jun 8, 2026
1 check passed
@ABB65 ABB65 deleted the chore/contentrain-pkg-1.5-alignment branch June 8, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant